home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / srffttar.z / srffttar / SRFFT / fftoutc.c < prev    next >
C/C++ Source or Header  |  1991-08-26  |  2KB  |  93 lines

  1. /* ------------------------- fftoutc.c -------------------------------- */
  2. /*                                    */
  3. /* Author:    Eyal Lebedinsky                        */
  4. /* Date:    May 1990                        */
  5. /* Version:    9 June 1991                        */
  6. /*                                    */
  7. /* called from fftg.c and generates C output                */
  8. /* uses the header "fftsubs.h"                         */
  9. /*                                    */
  10. /* This program is released into the public domain.            */
  11. /*                                    */
  12. /*----------------------------------------------------------------------*/
  13.  
  14. #include <stdio.h>
  15. #define S(x) (unsigned short)((x) & 0xffff)
  16.  
  17. static int    label = 0;
  18.  
  19. void
  20. start_fft (file_name, ep_name)
  21. char    *file_name, *ep_name;
  22. {
  23.     char    fname[256];
  24.  
  25.     strcpy (fname, file_name);
  26.     strcat (fname, ".c");
  27.  
  28.     freopen (fname, "wt", stdout);
  29.     printf ("#include \"fftsubs.h\"\n");
  30.     printf ("void %s(){\n", ep_name);
  31.     printf ("init\n");
  32. }
  33.  
  34. void
  35. end_fft (file_name, ep_name)
  36. char    *file_name, *ep_name;
  37. {
  38.     printf ("}\n");
  39.     close (stdout);
  40. }
  41.  
  42. void
  43. fft1 (i1)
  44. int    i1;
  45. {
  46.     printf ("_fft1(%d)\n", i1);
  47. }
  48.  
  49. void
  50. fft2 (i1, i2)
  51. int    i1, i2;
  52. {
  53.     printf ("_fft2(%d,%d)\n", i1, i2);
  54. }
  55.  
  56. void
  57. fft3 (i1, i3, i4)
  58. int    i1, i3, i4;
  59. {
  60.     printf ("_fft3(%d,%d,%d)\n", i1, i3, i4);
  61. }
  62.  
  63. void
  64. fft4 (i1, i2, i3, i4, cc1)
  65. int    i1, i2, i3, i4, cc1;
  66. {
  67.     printf ("_fft4(%d,%d,%d,%d,0x%04x)\n", i1, i2, i3, i4, (short)cc1);
  68. }
  69.  
  70. void
  71. fft5 (i1, i2, i3, i4, i5, i6, i7, i8, sm1, sp1, cc1, sm3, sp3, cc3, ind)
  72. int    i1, i2, i3, i4, i5, i6, i7, i8, sm1, sp1, cc1, sm3, sp3, cc3, ind;
  73. {
  74.     printf ("_fft5(%d,%d,%d,%d,%d,%d,%d,%d,",
  75.         i1, i2, i3, i4, i5, i6, i7, i8);
  76.     printf ("0x%04x,0x%04x,0x%04x,0x%04x,0x%04x,0x%04x,%d)\n",
  77.         S(sm1), S(sp1), S(cc1), S(sm3), S(sp3), S(cc3), ind);
  78. }
  79.  
  80. void
  81. fft7 (i1, i2)
  82. int    i1, i2;
  83. {
  84.     printf ("_fft7(%d,%d)\n", i1, i2);
  85. }
  86.  
  87. void
  88. fft8 (i1, i2, i3)
  89. int    i1, i2, i3;
  90. {
  91.     printf ("_fft8(%d,%d,%d)\n", i1, i2, i3);
  92. }
  93.